package util

import (
	"fmt"
	"net"
)

func TcpScan(hostname, port string) bool {
	if len(hostname) == 0 {
		hostname = "localhost"
	}

	con, err := net.Dial("tcp", fmt.Sprintf("%s:%s", hostname, port))
	if err != nil {
		return true
	}
	defer con.Close()

	return false
}
